#pragma once

#include "../SGD Wrappers\CSGD_TextureManager.h" //rect/points
#include <string>
#include "Physics.h"
using namespace std;

#ifndef DEBUG_COLLISION
#define DEBUG_COLLISION 0
#endif

struct CollisionInfo;

class GameObject
{
protected:
	float positionX;
	float positionY;
	int imageID;
	bool canBeGrappled;
	bool isActive;
	bool CheckpointActive;
	RECT hitBox;
	string objectID;
	string tag;
	POINT startPosition;
	POINT checkpointPosition;

	//crushing vars
	float isCrushing;
	LONG maxHeight;
public:
	GameObject(void);
	virtual ~GameObject(void);

	virtual void Update(float deltaTime);
	virtual void Render(void) const;
	virtual void HandleCollision(GameObject& other, CollisionInfo& info);
	//set in constructor?
	const string& GetObjectID() const	{return objectID;}

	string GetTag() const {return tag;}
	void SetTag(string newTag) {tag = newTag;}

	void SetPosX(float posx);
	void SetPosY(float posy);
	float GetPosX( void ) const;
	float GetPosY( void ) const;
	bool GetIsActive( void ) const;
	void SetIsActive( bool active ) {isActive = active;}
	RECT GetHitBox() const;
	virtual void SetHitBox(RECT hitbox);
	void SetCanBeGrappled(bool canBeGrappled);

	int GetImageID() const;
	bool CanBeGrappled(void) const { return canBeGrappled; }
	void SetImageID(int ID);
	virtual void ResetToCheckPoint();
	virtual void ResetToStart();

	void SetStartPosition(POINT position) {startPosition = position;}
	void SetStartPosition(float x, float y);
	void SetCheckPointPosition(POINT position) {checkpointPosition = position;}
	void SetCheckPointPosition(float x, float y);
	virtual void SetCheckPointData();
	void SetCheckPointIsActive( bool Active );

	void SetIsCrushing(float imageScale) {isCrushing = imageScale;}
	float GetIsCrushing() {return isCrushing;}
	void SetCrushMaxHeight(LONG height) {maxHeight = height;}
	LONG GetCrushMaxHeight() {return maxHeight;}

	virtual int Push( CollisionSide side, int amtToMove ) { return 0; }
};

